package com.yuandian.business.monitor.controller;

import com.yuandian.api.business_monitor.entity.BusinessStepLearningParams;
import com.yuandian.bpm.common.core.util.R;
import com.yuandian.business.monitor.service.BusinessStepLearningService;
import com.yuandian.utils.PageDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author lijunhang
 * @date 2023年07月13日 9:18
 * @description
 */
@RestController
@RequestMapping("/BusinessStepLearning")
public class BusinessStepLearningController {

    @Autowired
    private BusinessStepLearningService service;



    @RequestMapping("/selectBusiStepLearningList")
    public R selectBusiStepLearningList(@RequestBody BusinessStepLearningParams params) {
        PageDataInfo pageDataInfo = service.selectBusiStepLearningList(params);
        return R.ok(pageDataInfo);
    }


    @RequestMapping("/downloadBusiStepLearningList")
    public void downloadBusiStepLearningList(BusinessStepLearningParams params, HttpServletResponse response) throws IOException {
        service.downloadBusiStepLearningList(params, response);
    }

}
